
import {Link,useNavigate} from 'react-router-dom';
import { Button } from 'antd';
const Home = () => {
    const navigate = useNavigate();
    return (
       <div className='flex flex-col items-start'>
            <Link to="/getRouterParams">Link to Next</Link>
            <Button onClick={()=>navigate('/getRouterParams')}>navigate to Next</Button>
            <Button onClick={()=>navigate('/getRouterParams?id=1&name=chaochao')}>navigate--searchParams传参</Button>
            <Button onClick={()=>navigate('/getRouterParams/1/chaochao')}>navigate--params传参</Button>
       </div>
    )
}
export default Home;